import App from './App'
import Vue from 'vue'
import mixin from '@/mixin/mixin.js'
import store from "store/index.js"
import {
	showToast
} from '@/util/util.js'
import QQMapWX from './lib/qqmap-wx-jssdk.min.js';
import CustomLoading from '@/components/CustomLoading/CustomLoading.vue'
uni.showCustomLoading = function(option) {
	store.commit('loading/SET_SHOW', true)
	store.commit('loading/SET_MASK', option?.mask || true)
	store.commit('loading/SET_TITLE', option?.title || '加载中')
}
uni.hideCustomLoading = function() {
	store.commit('loading/SET_SHOW', false)
	store.commit('loading/SET_MASK', false)
	store.commit('loading/SET_TITLE', '加载中')
}
Vue.component('loading', CustomLoading)
Vue.config.productionTip = false
Vue.prototype.showToast = showToast;
Vue.prototype.qqMap = new QQMapWX({
	key: 'CRUBZ-TQREQ-OPS5M-27LCN-ZOWJS-NHFTO'
})
Vue.mixin(mixin)
App.mpType = 'app'
const app = new Vue({
	...App,
	store,
})
app.$mount()